import ajax from "./ajax";
const BASE_URL = '/api'
const BASE_URL1 = '/app'
//根据id获取正在热映的电影
export const reqIsMovie = ({count,start,apikey,city}) => ajax(`${BASE_URL1}/movie/in_theaters`,{city,start,count,apikey})

//即将上映的电影
export const reqUpcomingMovie = ({ apikey,start,count,city}) => ajax(`${BASE_URL1}/movie/coming_soon`,{apikey,start,count,city})

//根据关键字搜索电影
// export const reqSearchMovie = ({ start, count, tag, apikey }) => ajax(`${BASE_URL1}/movie/search`,{apikey,count,tag,start})
export const reqSearchMovie = ({cityId,kw}) => ajax(`${BASE_URL}/searchList`,{cityId,kw})
//获取城市
export const reqCity = () => ajax(`${BASE_URL}/cityList`)

//获取电影详情
export const reqDetailMovie = (movieId) => ajax(`${BASE_URL}/detailmovie?movieId=${movieId}`)

//获取影院
export const reqCinema = (cityId) => ajax(`${BASE_URL}/cinemaList?cityId=${cityId}`)

//获取城市定位
export const reqCityAddress = () => ajax(`${BASE_URL}/getLocation`)